package com.rookie.data.generate.constant.annotation;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author rookie
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface CommonType {

    CommonTypeEnum type();

    String value() default "";

    @Getter
    @AllArgsConstructor
    enum CommonTypeEnum {
        /**
         * 生成的数据类型
         */
        PHONE("phone"),

        EMAIL("email"),

        UUID("uuid"),

        /**
         * 时间 + （主机和机器码）ID
         */
        TIME_ID("timeId"),

        UNIQUE_ID("uniqueId"),

        REGULAR("regular"),

        ID_CARD("idCard"),

        IMG_URL("imgUrl"),

        WEB_FILE("webFile"),

        CHINESE_NAME("chineseName"),

        IP_ADDRESS("ipAddress");

        private final String name;
    }
}
